package com.ls.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

@RestController
public class LoginController {

    /**
     * 获取当前用户
     *
     * @return
     */
    @GetMapping("getUserInfo")
    public Principal userInfo(Principal principal) {
        return principal;
    }
}
